I wrote DOSToHelp and the CLibs documentation, do anything with them that you like, and please add a lot of documentation to the CLibs manual. If you write a few pages, please send them to me, and I will keep updating the manual. Send pages to kramer@phys.uva.nl
The C tutorial is FreeWare, and it's copyright notice is in the file TABCONT.TXT in the genctxt archive. Please read it.
*** What is it ***
This package consists of four parts:
1) genctxt - containing the text of Coronado's C tutorial
2) gencsrc - containing the example programs for the C tutorial
3) CLibs - a StrongHelp manual that has help on the ANSI C libraries
4) DOSToHelp - programs to convert the files from genctxt to StrongHelp
Aspiring C programmers might be interested to know that Coronado have also produced a C++ language tutorial. This is available in any SimTel mirror as 'cptutt22.zip' and 'cptuts22.zip'.
The C tutorial is a complete beginners tutorial for the C language. Together with the example programs, it forms a very nice introduction to the C language. Unfortunately, it is not in a very nice format, and the data in the archives may not be distributed in a modified form. The programs in the DOSToHelp archive are meant to remedy these defects.
After setting up and running the !MakeHelp script, a new StrongHelp manual will have been created called 'CLang'. This is a converted version of 'genctxt', which contains, amongst other things, links to the example files. The example files are expected to be in the directory 'CHelpSources:'. By default, this is in the archive 'gencsrc'. If you will use this manual frequently you must put a line '*Set CHelpSources$Path <full path name of src archive>.' in, for instance, StrongHelp's !Run file. Otherwise, the help system will not know where to find the sources.
Setting up:
(assuming you are using ArcFS or SparkFS to read the archives)
The CLibs manual is a standalone manual, and can be copied straight to StrongHelp's HelpData directory if you want.
- Create a temporary directory to put the files in
- Copy the contents from the DOSToHelp archive to the temporary directory
- Copy the gencsrc and genctxt archives to the temporary directory
- Run !MakeHelp. This will create the CLang manual on the RAM disc. Make sure you have at least 300k free on the RAM disc, or change the 4th line in the MakeHelp file so the final manual will be put somewhere else.
- Copy the CLang manual to where you want it, and copy the gencsrc archive to a safe place. Remember to add a line to StrongHelp's run file that sets the variable CHelpSources$Path to the new directory!
- Open the manuals, and see what they're worth.
- You can now remove everything but the CLang and CLibs manuals and 'gencsrc'
* BEGINNERS NOTE *
If you want to compile an example file, you'll run into trouble because of file naming conventions. The DOS filename 'WRTSOME.C' is illegal under RISC OS, because dots are used as directory seperators. Therefore, it is translated to WRTSOME/C by ArcFS and SparkFS. The compilers and linkers, on the other hand, expects it to the file 'WRTSOME' be in a directory 'C'. The same goes for files with extension 'H' and 'O'
So to compile, for example, CHAROUT.C (chapter 10), click on the link CHAROUT.C and save the file (FORMOUT/C) as FormOut somewhere in a directory named 'C'. Now move to the parent directory of 'C' and type *cc FORMOUT.C -o FORMOut. This will compile FormOut, creating the object file 'o.FormOut' (if directory 'O' exists) and link the object to produce the executable file FormOut. This executable will generate an error, of course, because the program source references 'tenlines.txt' which is illegal again. So edit the source, change the 'tenlines.txt' to 'tenlines' and recompile. Then copy TENLINES/TXT from 'gencsrc' as 'TenLines' in the parent directory, and now you can finally type *FormOut and it will run.